
#include "include.h"






u32 u32TimeCnt=0u;



int main(void)
{
	Gpio_Config();
	Uart_Config();
	Tim_Config();
	Adc_Config();
	while(1)
	{
		if(u32TimeCnt != u32TimBaseCnt)
		{
			u32TimeCnt = u32TimBaseCnt;
			PWM_MotorControl();
			Adc_GetSampVal();
		}
#if (UART_SWITCH == UART_ON)
		if(Uart_TXFlag==1)
		{
			Uart_FIFOStoreFunction("Freq",(sizeof("Freq")-1));
			Uart_16BitDataConvertFunction(u16INPWM_Freq);
			Uart_FIFOStoreFunction("Duty",(sizeof("Duty")-1));
			Uart_16BitDataConvertFunction(u16INPWM_DutyCycle);
			Uart_TXFlag=0;
		}
		if(u32TimeCnt != 0)
		{
			Uart_TxMainFunction();
		}else{;}
		#endif
	}

}














